<template>
  <div class="shell">


        <el-menu :default-active="activeIndex" class="" mode="horizontal" @select="handleSelect" active-text-color="#ea6f5a" :router="true">
          <el-menu-item ><a href="#/"><img :src="src_logo" height="54" width="100" alt=""/></a></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item :index="'/'"><span class="nav-title"><i class="el-icon-search"></i>发现</span></el-menu-item>
          <el-menu-item :index="'/subscriptions'"><span class="nav-title"><i class="el-icon-view"></i>关注</span></el-menu-item>
<!--          <el-menu-item :index="'/notifications'"><span class="nav-title"><i class="el-icon-bell"></i>消息</span></el-menu-item>-->
          <el-menu-item>
            <el-input
                placeholder="查询内容..."
                v-model="query.keyword"
                clearable
                @focus="onFocusIn"
                @blur="onFocusOut"
                ref="search_input"
            >
              <el-button slot="append" icon="el-icon-search" @click="toSearch"></el-button>
            </el-input>

          </el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item ><span hidden></span></el-menu-item>
          <el-menu-item :index="'/user'"><el-avatar size="large" src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"></el-avatar></el-menu-item>
          <el-menu-item :index="'/write'"><el-button type="danger" @click="" disabled>写文章</el-button></el-menu-item>
        </el-menu>




  </div>

  </template>

<script>
  export default {
    name: "TopNavBar",
    data() {
      return{
        activeIndex: '/',
        query:{keyword:''},
        src_logo: 'https://murasakichigo.xyz/my-jianshu-simu/assets/img/jianshu_logo.png',
      }
    },
    methods:{
      handleSelect(index) {

      },
      toSearch(key) {

      },

      onFocusIn() {


      },

      onFocusOut() {

      },

      getActiveIndex() {
        let uri = this.$route.path;
        return uri[uri.length - 1];
      },
    },
    created() {
    },

  }
</script>

<style scoped lang="less">
  .shell {
    height: 56px;
  }

  .push-right {
    float: right;
  }

  .nav-title{
    font-size: 17px;
    /*color: #ea6f5a*/
  }



</style>